<?php


namespace app\validate;


class AttachmentCateValidate extends \think\Validate
{
    protected $rule = [
        'id' => 'require',
        'page'=> 'require|number',
        'limit'=> 'require|number',
        'title' => 'require',
    ];

    protected $message = [
        'id.require' => '主键不能为空',
        'page.require' => '当前页数不能为空',
        'page.number' => '当前页数必须为数字',
        'limit.require' => '当前页数不能为空',
        'limit.number' => '当前页数必须为数字',
        'title.require' => '名称不能为空',
    ];

    protected $scene = [
        'index' => ['page', 'limit'],
        'read' => ['id', ],
        'save' => ['title'],
        'update' => ['id', ]
    ];
}